libs: particle Electron Jet Muon EvtData LeptonicZReconstructor HadronicWReconstructor Analysis DelphesData E6ANA E6ANA2 GenericHistogrammer d3pdrel16 d3pdBoost ConfigParser Run

analysis: main

particle:
	g++ -c -fPIC -Wall src/base/particle.cxx -I`root-config --incdir` -Isrc -o bin/particle.o
	g++ -fPIC -shared -Wall bin/particle.o `root-config --libs` -o lib/libparticle.so
	rm bin/particle.o
Electron:
	g++ -c -fPIC -Wall src/Electron.cxx -I`root-config --incdir` -Isrc -o bin/Electron.o
	g++ -fPIC -shared -Wall bin/Electron.o `root-config --libs` -o lib/libElectron.so
	rm bin/Electron.o
Jet:
	g++ -c -fPIC -Wall src/Jet.cxx -I`root-config --incdir` -Isrc -o bin/Jet.o
	g++ -fPIC -shared -Wall bin/Jet.o `root-config --libs` -o lib/libJet.so
	rm bin/Jet.o
Muon:
	g++ -c -fPIC -Wall src/Muon.cxx -I`root-config --incdir` -Isrc -o bin/Muon.o
	g++ -fPIC -shared -Wall bin/Muon.o `root-config --libs` -o lib/libMuon.so
	rm bin/Muon.o
EvtData:
	g++ -c -fPIC -Wall src/base/EvtData.cxx -I`root-config --incdir` -Isrc -o bin/EvtData.o
	g++ -fPIC -shared -Wall bin/EvtData.o -Llib `root-config --libs` -lparticle -lElectron -lMuon -lJet -o lib/libEvtData.so
	rm bin/EvtData.o
LeptonicZReconstructor:
	g++ -c -fPIC -Wall src/LeptonicZReconstructor.cxx -I`root-config --incdir` -Isrc -o bin/LeptonicZReconstructor.o
	g++ -fPIC -shared -Wall bin/LeptonicZReconstructor.o -Llib -lEvtData -lparticle -lMuon -lElectron -lJet -o lib/libLeptonicZReconstructor.so
	rm bin/LeptonicZReconstructor.o
HadronicWReconstructor:
	g++ -c -fPIC -Wall src/HadronicWReconstructor.cxx -I`root-config --incdir` -Isrc -o bin/HadronicWReconstructor.o
	g++ -fPIC -shared -Wall bin/HadronicWReconstructor.o -Llib -lEvtData -lparticle -lElectron -lMuon -lJet -o lib/libHadronicWReconstructor.so
	rm bin/HadronicWReconstructor.o
Analysis :
	g++ -c -fPIC -Wall src/base/Analysis.cxx -I`root-config --incdir` -Iexternal/libconfig-1.4.8/include -Isrc -o bin/Analysis.o
	g++ -fPIC -shared -Wall bin/Analysis.o  -Llib `root-config --libs` -Lexternal/libconfig-1.4.8/lib -lconfig++ -lparticle -lElectron -lMuon -lJet -o lib/libAnalysis.so 
	rm bin/Analysis.o
DelphesData:
	g++ -c -fPIC -Wall -Isrc src/DelphesData.cxx -I`root-config --incdir` -o bin/DelphesData.o
	g++ -fPIC -Wall -shared bin/DelphesData.o `root-config --libs` -Llib -lEvtData -lparticle -lElectron -lMuon -lJet -Isrc -o lib/libDelphesData.so
	rm bin/DelphesData.o
E6ANA:
	g++ -c -fPIC -Wall src/E6ANA.cxx -I`root-config --incdir` -Isrc -o bin/E6ANA.o
	g++ -fPIC -shared -Wall bin/E6ANA.o -Llib -lAnalysis -lEvtData -lLeptonicZReconstructor -lHadronicWReconstructor `gsl-config --libs` -o lib/libE6ANA.so
	rm bin/E6ANA.o

E6ANA2:
	g++ -c -fPIC -Wall src/E6ANA2.cxx -I`root-config --incdir` -Isrc -o bin/E6ANA2.o
	g++ -fPIC -shared -Wall bin/E6ANA2.o -Llib -lAnalysis -lEvtData `gsl-config --libs` -o lib/libE6ANA2.so
	rm bin/E6ANA2.o	

GenericHistogrammer:
	g++ -c -fPIC -Wall src/GenericHistogrammer.cxx -I`root-config --incdir` -Isrc -o bin/GenericHistogrammer.o
	g++ -fPIC -shared -Wall bin/GenericHistogrammer.o -Llib -lAnalysis -lEvtData -o lib/libGenericHistogrammer.so
	rm bin/GenericHistogrammer.o
d3pdrel16:
	g++ -c -fPIC -Wall src/d3pdrel16.cxx -I`root-config --incdir` -Isrc -o bin/d3pdrel16.o
	g++ -fPIC -shared -Wall bin/d3pdrel16.o -Llib -lEvtData -lparticle `root-config --libs` -o lib/libd3pdrel16.so
	rm bin/d3pdrel16.o

d3pdBoost:
	g++ -c -fPIC -Wall src/d3pdrel15.cxx -I`root-config --incdir` -Isrc -o bin/d3pdrel15.o
	g++ -fPIC -shared -Wall bin/d3pdrel15.o -Llib -lEvtData -lparticle `root-config --libs` -o lib/libd3pdrel15.so
	rm bin/d3pdrel15.o
	
ConfigParser:
	g++ -c -fPIC -Wall src/ConfigParser.cxx -Iexternal/libconfig-1.4.8/include/ -I`root-config --incdir` -Isrc -o bin/ConfigParser.o
	g++  -fPIC -Wall -shared bin/ConfigParser.o -Llib -Lexternal/libconfig-1.4.8/lib -lconfig++ -lAnalysis -lE6ANA -lE6ANA2 -lGenericHistogrammer `root-config --libs` -o lib/libConfigParser.so
	rm bin/ConfigParser.o
Run:
	g++ -c -fPIC -Wall src/Run.cxx -I`root-config --incdir` -Iexternal/libconfig-1.4.8/include/ -Isrc -o bin/Run.o
	g++ -fPIC -Wall -shared bin/Run.o -Llib `root-config --libs` -lConfigParser -lAnalysis -lEvtData  -lDelphesData -ld3pdrel16 -ld3pdrel15 -o lib/libRun.so
	rm bin/Run.o
main:
	g++ -c src/main.cpp -I`root-config --incdir` -Iexternal/libconfig-1.4.8/include/ -Isrc -o bin/main.o
	g++ -fPIC -Wall bin/main.o `root-config --libs` -Llib -Lexternal/libconfig-1.4.8/lib -lconfig++ -lparticle -lEvtData -lAnalysis  -lDelphesData -ld3pdrel16 -ld3pdrel15 -lE6ANA -lE6ANA2 -lGenericHistogrammer -lConfigParser -lRun -lLeptonicZReconstructor -lHadronicWReconstructor -lElectron -lJet -lMuon -o bin/main.exe
	rm bin/main.o
